<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{width: 100px;height: 100px;border: 1px solid red}
        div:hover{
            /*由于静态定位无法实现层叠效果，所以需要使用相对定位*/
            /*margin: 20px 0 0 20px;*/
            position: relative;
            left: 20px;
            top: 20px;
        }
    </style>
</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>
</body>
</html>